import path from 'path';
module.exports = {
    entry: {
      index: './src/main.js'
    },
    output: {
      path: path.join(__dirname, 'dist'),
      filename: '[name]_[chunkhash].js'
    },
    mode: 'production',
    module: {
      rules: [
        {
          test: /.less$/,
          use: [
            MiniCssExtractPlugin.loader,
            'css-loader',
            'less-loader',
            {
              loader: 'postcss-loader',
              options: {
                plugins: () => [
                  require('autoprefixer')({
                    browsers: ['last 2 version', '>1%', 'ios 7']
                  })
                ]
              }
            }
          ]
        },
      ]
    },
  };